<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
    <title>vue.extend 构造器的延伸</title>
</head>

<body>
    <h1>vue.extend 构造器的延伸</h1>
    <hr>
    <author></author>

    <script type="text/javascript">
        var authorExtend = Vue.extend({
            template:"<p><a :href='authorUrl'>{{authorName}}</a></p>",
            data:function(){
                return{
                    authorName:'Link',
                    authorUrl:'http://liuyanspace.cn/' 
                }
            }
        })
        new authorExtend().$mount('author');  
        
    </script>
</body>

</html>